Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## rdlc.main
Class Main.MainLoader

    java.lang.Object
      org.xml.sax.helpers.DefaultHandler
          rdlc.main.Main.MainLoader

All Implemented Interfaces:
  org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

Enclosing class:
  Main

    protected class Main.MainLoader

extends org.xml.sax.helpers.DefaultHandler
implements org.xml.sax.ErrorHandler

Contains all of the XML handling code needed to load the configuration file.

Version:
  $Revision: 1.40 $
Author:
  Greg Gibeling

Field Summary
`static java.lang.String` | `ATTR_CONFIG` Attribute name for the configuration string attribute.
`static java.lang.String` | `ATTR_DEFAULT` Attribute name for the default value.
`static java.lang.String` | `ATTR_NAME` Attribute name for the name attribute.
`static java.lang.String` | `ATTR_OPTIONAL` Attribute name for the option attribute.
`static java.lang.String` | `ATTR_RESOURCE` Attribute name for the resource string attribute.
`static java.lang.String` | `ATTR_TEXT` Attribute name for the text name.
`static java.lang.String` | `ATTR_TYPE` Attribute name for the type attribute.
`protected java.lang.String` | `cdata` Accumulated character data.
`protected java.lang.Class` | `commandClass` The command being loaded.
`protected Main.CommandInfo` | `commandInfo` Info for the command being loaded.
`static java.lang.String` | `ELEM_COMMAND` Element name for a command.
`static java.lang.String` | `ELEM_HELP` Element name for the command line help for a command.
`static java.lang.String` | `ELEM_LANGUAGE` Element name for a command language configuration.
`static java.lang.String` | `ELEM_OPTION` Element name for the command line option.
`static java.lang.String` | `ELEM_PLUGIN` Element name for a plugin.
`static java.lang.String` | `ELEM_RDLC` Name for the top level configuration file element.
`protected int` | `gotRDLC` Count indicating the number of nested rdlc tags.
`protected org.xml.sax.Locator` | `locator` Locator provided by the XML parser to get line numbers and such.
`protected java.lang.String` | `resourceName` The name of the XML resource.

Constructor Summary
`Main.MainLoader(java.io.InputStream inputStream)` Standard constructor.
`Main.MainLoader(java.lang.String _resourceName, boolean tryResource)` Standard constructor.

Method Summary
`void` | `characters(char[] buf, int offset, int len)` Accumulate character data.
`void` | `endDocument()`
`void` | `endElement(java.lang.String URI, java.lang.String localName, java.lang.String qualifiedName)` Simple cleanup routine to handle the end of an element.
`void` | `error(org.xml.sax.SAXParseException exception)` Simply throws the exception to abort parsing.
`void` | `fatalError(org.xml.sax.SAXParseException exception)` Simply throws the exception to abort parsing.
`void` | `loadConfig(java.io.InputStream inputStream, java.lang.String _schemaName)` Attempts to open the resource using the given resource name and parse it in as an XML configuration file.
`void` | `loadConfig(java.lang.String _resourceName, boolean tryResource, java.lang.String _schemaName)` Attempts to open the resource using the given resource name and parse it in as an XML configuration file.
`void` | `setDocumentLocator(org.xml.sax.Locator _locator)`
`void` | `startDocument()`
`void` | `startElement(java.lang.String URI, java.lang.String localName, java.lang.String qualifiedName, org.xml.sax.Attributes attributes)` Element start handler, creates language data structures and fills them with class references as appropriate.
`void` | `warning(org.xml.sax.SAXParseException exception)` Simply throws the exception to abort parsing.

Methods inherited from class org.xml.sax.helpers.DefaultHandler
`endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startPrefixMapping, unparsedEntityDecl`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### ELEM_RDLC

    public static final java.lang.String ELEM_RDLC

  Name for the top level configuration file element.

  See Also:
    Constant Field Values

### ELEM_COMMAND

    public static final java.lang.String ELEM_COMMAND

  Element name for a command.

  See Also:
    Constant Field Values

### ELEM_PLUGIN

    public static final java.lang.String ELEM_PLUGIN

  Element name for a plugin.

  See Also:
    Constant Field Values

### ELEM_LANGUAGE

    public static final java.lang.String ELEM_LANGUAGE

  Element name for a command language configuration.

  See Also:
    Constant Field Values

### ELEM_HELP

    public static final java.lang.String ELEM_HELP

  Element name for the command line help for a command.

  See Also:
    Constant Field Values

### ELEM_OPTION

    public static final java.lang.String ELEM_OPTION

  Element name for the command line option.

  See Also:
    Constant Field Values

### ATTR_NAME

    public static final java.lang.String ATTR_NAME

  Attribute name for the name attribute.

  See Also:
    Constant Field Values

### ATTR_RESOURCE

    public static final java.lang.String ATTR_RESOURCE

  Attribute name for the resource string attribute.

  See Also:
    Constant Field Values

### ATTR_CONFIG

    public static final java.lang.String ATTR_CONFIG

  Attribute name for the configuration string attribute.

  See Also:
    Constant Field Values

### ATTR_TYPE

    public static final java.lang.String ATTR_TYPE

  Attribute name for the type attribute.

  See Also:
    Constant Field Values

### ATTR_OPTIONAL

    public static final java.lang.String ATTR_OPTIONAL

  Attribute name for the option attribute.

  See Also:
    Constant Field Values

### ATTR_TEXT

    public static final java.lang.String ATTR_TEXT

  Attribute name for the text name.

  See Also:
    Constant Field Values

### ATTR_DEFAULT

    public static final java.lang.String ATTR_DEFAULT

  Attribute name for the default value.

  See Also:
    Constant Field Values

### locator

    protected org.xml.sax.Locator locator

  Locator provided by the XML parser to get line numbers and such.

### resourceName

    protected java.lang.String resourceName

  The name of the XML resource.

### gotRDLC

    protected int gotRDLC

  Count indicating the number of nested rdlc tags.

### commandClass

    protected java.lang.Class commandClass

  The command being loaded.

### commandInfo

    protected Main.CommandInfo commandInfo

  Info for the command being loaded.

### cdata

    protected java.lang.String cdata

  Accumulated character data.

Constructor Detail

### Main.MainLoader

    public Main.MainLoader(java.lang.String _resourceName,
                           boolean tryResource)

  Standard constructor. Simply loads the configuration file.

### Main.MainLoader

    public Main.MainLoader(java.io.InputStream inputStream)

  Standard constructor. Simply loads the configuration file.

Method Detail

### loadConfig

    public void loadConfig(java.lang.String _resourceName,
                           boolean tryResource,
                           java.lang.String _schemaName)

  Attempts to open the resource using the given resource name and parse it in as an XML configuration file.

  Parameters:
    `_resourceName` - The name of the resource to load as the config file.
    `tryResource` - Should the resource name be loaded as an actual resource? (as opposed to using it as a file name only).
    `_schemaName` - The name of the resource containing the XML schema. This is always a resource, never a file.

### loadConfig

    public void loadConfig(java.io.InputStream inputStream,
                           java.lang.String _schemaName)

  Attempts to open the resource using the given resource name and parse it in as an XML configuration file.

  Parameters:
    `inputStream` - The input stream to load.
    `_schemaName` - The name of the resource containing the XML schema. This is always a resource, never a file.

### setDocumentLocator

    public void setDocumentLocator(org.xml.sax.Locator _locator)

  Specified by:
    `setDocumentLocator` in interface `org.xml.sax.ContentHandler`
  Overrides:
    `setDocumentLocator` in class `org.xml.sax.helpers.DefaultHandler`
  See Also:
    `DefaultHandler.setDocumentLocator(org.xml.sax.Locator)`

### startDocument

    public void startDocument()
                       throws org.xml.sax.SAXException

  Specified by:
    `startDocument` in interface `org.xml.sax.ContentHandler`
  Overrides:
    `startDocument` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXException`
  See Also:
    `DefaultHandler.startDocument()`

### endDocument

    public void endDocument()
                     throws org.xml.sax.SAXException

  Specified by:
    `endDocument` in interface `org.xml.sax.ContentHandler`
  Overrides:
    `endDocument` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXException`
  See Also:
    `DefaultHandler.endDocument()`

### startElement

    public void startElement(java.lang.String URI,
                             java.lang.String localName,
                             java.lang.String qualifiedName,
                             org.xml.sax.Attributes attributes)
                      throws org.xml.sax.SAXException

  Element start handler, creates language data structures and fills them with class references as appropriate. Also responsible for loading plugins.

  Specified by:
    `startElement` in interface `org.xml.sax.ContentHandler`
  Overrides:
    `startElement` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXException`
  See Also:
    `DefaultHandler.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)`

### endElement

    public void endElement(java.lang.String URI,
                           java.lang.String localName,
                           java.lang.String qualifiedName)
                    throws org.xml.sax.SAXException

  Simple cleanup routine to handle the end of an element.

  Specified by:
    `endElement` in interface `org.xml.sax.ContentHandler`
  Overrides:
    `endElement` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXException`
  See Also:
    `DefaultHandler.endElement(java.lang.String, java.lang.String, java.lang.String)`

### characters

    public void characters(char[] buf,
                           int offset,
                           int len)
                    throws org.xml.sax.SAXException

  Accumulate character data.

  Specified by:
    `characters` in interface `org.xml.sax.ContentHandler`
  Overrides:
    `characters` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXException`
  See Also:
    `DefaultHandler.characters(char[], int, int)`

### error

    public void error(org.xml.sax.SAXParseException exception)
               throws org.xml.sax.SAXParseException

  Simply throws the exception to abort parsing.

  Specified by:
    `error` in interface `org.xml.sax.ErrorHandler`
  Overrides:
    `error` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXParseException`
  See Also:
    `ErrorHandler.error(org.xml.sax.SAXParseException)`

### fatalError

    public void fatalError(org.xml.sax.SAXParseException exception)
                    throws org.xml.sax.SAXParseException

  Simply throws the exception to abort parsing.

  Specified by:
    `fatalError` in interface `org.xml.sax.ErrorHandler`
  Overrides:
    `fatalError` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXParseException`
  See Also:
    `ErrorHandler.fatalError(org.xml.sax.SAXParseException)`

### warning

    public void warning(org.xml.sax.SAXParseException exception)
                 throws org.xml.sax.SAXParseException

  Simply throws the exception to abort parsing.

  Specified by:
    `warning` in interface `org.xml.sax.ErrorHandler`
  Overrides:
    `warning` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXParseException`
  See Also:
    `ErrorHandler.warning(org.xml.sax.SAXParseException)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD